<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
         <!--<el-form-item label="id" prop="id">
      <el-input
          v-model="queryParams.id"
          placeholder="请输入id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="创建人" prop="createBy">
        <el-input
          v-model="queryParams.createBy"
          placeholder="请输入创建人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="创建时间" prop="createTime">
        <el-date-picker clearable
          v-model="queryParams.createTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择创建时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="最后更新人" prop="updateBy">
        <el-input
          v-model="queryParams.updateBy"
          placeholder="请输入最后更新人"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最后更新时间" prop="updateTime">
        <el-date-picker clearable
          v-model="queryParams.updateTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择最后更新时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="承灾体分布图" prop="cztfbt">
        <el-input
          v-model="queryParams.cztfbt"
          placeholder="请输入承灾体分布图"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="范围" prop="distance">
        <el-input
          v-model="queryParams.distance"
          placeholder="请输入范围"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="风险评估id" prop="fxpgid">
        <el-input
          v-model="queryParams.fxpgid"
          placeholder="请输入风险评估id"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="管理部门" prop="glbm">
        <el-input
          v-model="queryParams.glbm"
          placeholder="请输入管理部门"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="距离最近成镇" prop="jlzjcz">
        <el-input
          v-model="queryParams.jlzjcz"
          placeholder="请输入距离最近成镇"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="救援队伍分布图" prop="jydwfbt">
        <el-input
          v-model="queryParams.jydwfbt"
          placeholder="请输入救援队伍分布图"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="救援队伍数量" prop="jydwsl">
        <el-input
          v-model="queryParams.jydwsl"
          placeholder="请输入救援队伍数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="评估时间" prop="pgsj">
        <el-date-picker clearable
          v-model="queryParams.pgsj"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择评估时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="省会城市" prop="shcs">
        <el-input
          v-model="queryParams.shcs"
          placeholder="请输入省会城市"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="省会城市距离" prop="shcsjl">
        <el-input
          v-model="queryParams.shcsjl"
          placeholder="请输入省会城市距离"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="威胁财产" prop="wxcc">
        <el-input
          v-model="queryParams.wxcc"
          placeholder="请输入威胁财产"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="威胁户数" prop="wxhs">
        <el-input
          v-model="queryParams.wxhs"
          placeholder="请输入威胁户数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="威胁人数" prop="wxrs">
        <el-input
          v-model="queryParams.wxrs"
          placeholder="请输入威胁人数"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资储备库分布图" prop="wzcbkfbt">
        <el-input
          v-model="queryParams.wzcbkfbt"
          placeholder="请输入物资储备库分布图"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="物资储备库数量" prop="wzcbksl">
        <el-input
          v-model="queryParams.wzcbksl"
          placeholder="请输入物资储备库数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="诱发因素" prop="yfys">
        <el-input
          v-model="queryParams.yfys"
          placeholder="请输入诱发因素"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="应急避难场所数量" prop="yjbncssl">
        <el-input
          v-model="queryParams.yjbncssl"
          placeholder="请输入应急避难场所数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="应急避难场所分布图" prop="yjbnsfbt">
        <el-input
          v-model="queryParams.yjbnsfbt"
          placeholder="请输入应急避难场所分布图"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="应急避难所范围" prop="yjbnsfw">
        <el-input
          v-model="queryParams.yjbnsfw"
          placeholder="请输入应急避难所范围"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="影响房屋数量" prop="yxfwsl">
        <el-input
          v-model="queryParams.yxfwsl"
          placeholder="请输入影响房屋数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="影响经济" prop="yxjj">
        <el-input
          v-model="queryParams.yxjj"
          placeholder="请输入影响经济"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="影响密集场所数量" prop="yxmjcssl">
        <el-input
          v-model="queryParams.yxmjcssl"
          placeholder="请输入影响密集场所数量"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="影响农田面积" prop="yxntmj">
        <el-input
          v-model="queryParams.yxntmj"
          placeholder="请输入影响农田面积"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="影响人口" prop="yxrk">
        <el-input
          v-model="queryParams.yxrk"
          placeholder="请输入影响人口"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item label="站点名称" prop="zdmc">
        <el-input
          v-model="queryParams.zdmc"
          placeholder="请输入站点名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="灾害类型" prop="zhlx">
        <el-input
          v-model="queryParams.zhlx"
          placeholder="请输入灾害类型"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <!-- <el-form-item label="灾害详细地址" prop="zhxxdz">
        <el-input
          v-model="queryParams.zhxxdz"
          placeholder="请输入灾害详细地址"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最近城镇距离" prop="zjczjl">
        <el-input
          v-model="queryParams.zjczjl"
          placeholder="请输入最近城镇距离"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item> -->
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['ybyj:fxpg:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['ybyj:fxpg:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['ybyj:fxpg:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['ybyj:fxpg:export']"
        >导出</el-button>
      </el-col>
      <el-col :span="1.5">
        <excelImport url="/ybyj/fxpg/import" @onSuccess="handleQuery" />
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="fxpgList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="id" align="center" prop="id" v-if="false"/>
      <!-- <el-table-column label="创建人" align="center" prop="createBy" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="最后更新人" align="center" prop="updateBy" />
      <el-table-column label="最后更新时间" align="center" prop="updateTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column> -->
      <!-- <el-table-column label="承灾体分布图" align="center" prop="cztfbt" /> -->
      <el-table-column label="范围" align="center" prop="distance" />
      <el-table-column label="风险评估id" align="center" prop="fxpgid" />
      <el-table-column label="管理部门" align="center" prop="glbm" />
      <el-table-column label="距离最近成镇" align="center" prop="jlzjcz" />
      <!-- <el-table-column label="救援队伍分布图" align="center" prop="jydwfbt" /> -->
      <el-table-column label="救援队伍数量" align="center" prop="jydwsl" />
      <el-table-column label="评估时间" align="center" prop="pgsj" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.pgsj, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="省会城市" align="center" prop="shcs" />
      <el-table-column label="省会城市距离" align="center" prop="shcsjl" />
      <el-table-column label="威胁财产" align="center" prop="wxcc" />
      <el-table-column label="威胁户数" align="center" prop="wxhs" />
      <el-table-column label="威胁人数" align="center" prop="wxrs" />
      <!-- <el-table-column label="物资储备库分布图" align="center" prop="wzcbkfbt" /> -->
      <el-table-column label="物资储备库数量" align="center" prop="wzcbksl" />
      <el-table-column label="诱发因素" align="center" prop="yfys" />
      <el-table-column label="应急避难场所数量" align="center" prop="yjbncssl" />
      <!-- <el-table-column label="应急避难场所分布图" align="center" prop="yjbnsfbt" /> -->
      <el-table-column label="应急避难所范围" align="center" prop="yjbnsfw" />
      <el-table-column label="影响房屋数量" align="center" prop="yxfwsl" />
      <el-table-column label="影响经济" align="center" prop="yxjj" />
      <el-table-column label="影响密集场所数量" align="center" prop="yxmjcssl" />
      <el-table-column label="影响农田面积" align="center" prop="yxntmj" />
      <el-table-column label="影响人口" align="center" prop="yxrk" />
      <el-table-column label="站点名称" align="center" prop="zdmc" />
      <el-table-column label="灾害类型" align="center" prop="zhlx" />
      <el-table-column label="灾害详细地址" align="center" prop="zhxxdz" />
      <el-table-column label="最近城镇距离" align="center" prop="zjczjl" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['ybyj:fxpg:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['ybyj:fxpg:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改风险评估对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="创建人" prop="createBy">
          <el-input-number v-model="form.createBy" placeholder="请输入创建人" />
        </el-form-item>
        <el-form-item label="创建时间" prop="createTime">
          <el-date-picker clearable
            v-model="form.createTime"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择创建时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="最后更新人" prop="updateBy">
          <el-input-number v-model="form.updateBy" placeholder="请输入最后更新人" />
        </el-form-item>
        <el-form-item label="最后更新时间" prop="updateTime">
          <el-date-picker clearable
            v-model="form.updateTime"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择最后更新时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="承灾体分布图" prop="cztfbt">
          <el-input v-model="form.cztfbt" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="范围" prop="distance">
          <el-input-number v-model="form.distance" placeholder="请输入范围" />
        </el-form-item>
        <el-form-item label="风险评估id" prop="fxpgid">
          <el-input v-model="form.fxpgid" placeholder="请输入风险评估id" />
        </el-form-item>
        <el-form-item label="管理部门" prop="glbm">
          <el-input v-model="form.glbm" placeholder="请输入管理部门" />
        </el-form-item>
        <el-form-item label="距离最近成镇" prop="jlzjcz">
          <el-input v-model="form.jlzjcz" placeholder="请输入距离最近成镇" />
        </el-form-item>
        <el-form-item label="救援队伍分布图" prop="jydwfbt">
          <el-input v-model="form.jydwfbt" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="救援队伍数量" prop="jydwsl">
          <el-input-number v-model="form.jydwsl" placeholder="请输入救援队伍数量" />
        </el-form-item>
        <el-form-item label="评估时间" prop="pgsj">
          <el-date-picker clearable
            v-model="form.pgsj"
            type="datetime"
            value-format="yyyy-MM-dd HH:mm:ss"
            placeholder="请选择评估时间">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="省会城市" prop="shcs">
          <el-input v-model="form.shcs" placeholder="请输入省会城市" />
        </el-form-item>
        <el-form-item label="省会城市距离" prop="shcsjl">
          <el-input-number v-model="form.shcsjl" placeholder="请输入省会城市距离" />
        </el-form-item>
        <el-form-item label="威胁财产" prop="wxcc">
          <el-input-number v-model="form.wxcc" placeholder="请输入威胁财产" />
        </el-form-item>
        <el-form-item label="威胁户数" prop="wxhs">
          <el-input-number v-model="form.wxhs" placeholder="请输入威胁户数" />
        </el-form-item>
        <el-form-item label="威胁人数" prop="wxrs">
          <el-input-number v-model="form.wxrs" placeholder="请输入威胁人数" />
        </el-form-item>
        <el-form-item label="物资储备库分布图" prop="wzcbkfbt">
          <el-input v-model="form.wzcbkfbt" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="物资储备库数量" prop="wzcbksl">
          <el-input-number v-model="form.wzcbksl" placeholder="请输入物资储备库数量" />
        </el-form-item>
        <el-form-item label="诱发因素" prop="yfys">
          <el-input v-model="form.yfys" placeholder="请输入诱发因素" />
        </el-form-item>
        <el-form-item label="应急避难场所数量" prop="yjbncssl">
          <el-input-number v-model="form.yjbncssl" placeholder="请输入应急避难场所数量" />
        </el-form-item>
        <el-form-item label="应急避难场所分布图" prop="yjbnsfbt">
          <el-input v-model="form.yjbnsfbt" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="应急避难所范围" prop="yjbnsfw">
          <el-input-number v-model="form.yjbnsfw" placeholder="请输入应急避难所范围" />
        </el-form-item>
        <el-form-item label="影响房屋数量" prop="yxfwsl">
          <el-input-number v-model="form.yxfwsl" placeholder="请输入影响房屋数量" />
        </el-form-item>
        <el-form-item label="影响经济" prop="yxjj">
          <el-input-number v-model="form.yxjj" placeholder="请输入影响经济" />
        </el-form-item>
        <el-form-item label="影响密集场所数量" prop="yxmjcssl">
          <el-input-number v-model="form.yxmjcssl" placeholder="请输入影响密集场所数量" />
        </el-form-item>
        <el-form-item label="影响农田面积" prop="yxntmj">
          <el-input-number v-model="form.yxntmj" placeholder="请输入影响农田面积" />
        </el-form-item>
        <el-form-item label="影响人口" prop="yxrk">
          <el-input-number v-model="form.yxrk" placeholder="请输入影响人口" />
        </el-form-item>
        <el-form-item label="站点名称" prop="zdmc">
          <el-input v-model="form.zdmc" placeholder="请输入站点名称" />
        </el-form-item>
        <el-form-item label="灾害类型" prop="zhlx">
          <el-input v-model="form.zhlx" placeholder="请输入灾害类型" />
        </el-form-item>
        <el-form-item label="灾害详细地址" prop="zhxxdz">
          <el-input v-model="form.zhxxdz" placeholder="请输入灾害详细地址" />
        </el-form-item>
        <el-form-item label="最近城镇距离" prop="zjczjl">
          <el-input-number v-model="form.zjczjl" placeholder="请输入最近城镇距离" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { listFxpg, getFxpg, delFxpg, addFxpg, updateFxpg } from "@/api/ybyj/fxpg";
import DynamicSelect from "@/components/DynamicSelect";
import AutoCompute from "@/components/AutoCompute";

export default {
  name: "Fxpg",
  components: { DynamicSelect, AutoCompute },
  data() {
    return {
      // 按钮loading
      buttonLoading: false,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 风险评估表格数据
      fxpgList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        id: undefined,
        createBy: undefined,
        createTime: undefined,
        updateBy: undefined,
        updateTime: undefined,
        cztfbt: undefined,
        distance: undefined,
        fxpgid: undefined,
        glbm: undefined,
        jlzjcz: undefined,
        jydwfbt: undefined,
        jydwsl: undefined,
        pgsj: undefined,
        shcs: undefined,
        shcsjl: undefined,
        wxcc: undefined,
        wxhs: undefined,
        wxrs: undefined,
        wzcbkfbt: undefined,
        wzcbksl: undefined,
        yfys: undefined,
        yjbncssl: undefined,
        yjbnsfbt: undefined,
        yjbnsfw: undefined,
        yxfwsl: undefined,
        yxjj: undefined,
        yxmjcssl: undefined,
        yxntmj: undefined,
        yxrk: undefined,
        zdmc: undefined,
        zhlx: undefined,
        zhxxdz: undefined,
        zjczjl: undefined
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询风险评估列表 */
    getList() {
      this.loading = true;
      listFxpg(this.queryParams).then(response => {
       Promise.all(
                [
                ]
              ).then(() => {
                this.fxpgList = response.rows;
                this.total = response.total;
                this.loading = false;
            })
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: undefined,
        createBy: undefined,
        createTime: undefined,
        deleted: undefined,
        updateBy: undefined,
        updateTime: undefined,
        cztfbt: undefined,
        cztid: undefined,
        distance: undefined,
        fxpgid: undefined,
        glbm: undefined,
        jlzjcz: undefined,
        jydwfbt: undefined,
        jydwsl: undefined,
        pgsj: undefined,
        shcs: undefined,
        shcsjl: undefined,
        wxcc: undefined,
        wxhs: undefined,
        wxrs: undefined,
        wzcbkfbt: undefined,
        wzcbksl: undefined,
        yfys: undefined,
        yjbncssl: undefined,
        yjbnsfbt: undefined,
        yjbnsfw: undefined,
        yxfwsl: undefined,
        yxjj: undefined,
        yxmjcssl: undefined,
        yxntmj: undefined,
        yxrk: undefined,
        zdmc: undefined,
        zhlx: undefined,
        zhxxdz: undefined,
        zjczjl: undefined
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加风险评估";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.loading = true;
      this.reset();
      const id = row.id || this.ids
      getFxpg(id).then(response => {
        this.loading = false;
        this.form = response.data;
        this.open = true;
        this.title = "修改风险评估";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          this.buttonLoading = true;
          if (this.form.id != null) {
            updateFxpg(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          } else {
            addFxpg(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            }).finally(() => {
              this.buttonLoading = false;
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除').then(() => {
        this.loading = true;
        return delFxpg(ids);
      }).then(() => {
        this.loading = false;
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {
      }).finally(() => {
        this.loading = false;
      });
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('ybyj/fxpg/export', {
        ...this.queryParams
      }, `fxpg_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
